<%-- 
    Document   : mostrarCatalogo
    Created on : 02-dic-2011, 10:06:50
    Author     : Curso
--%>

<%@page import="com.ipartek.formacion.gestformwww.modelo.beans.Curso"%>
<%@page import="java.util.ArrayList"%>
<%@page import="com.ipartek.formacion.gestformwww.modelo.beans.Convocatoria"%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">



<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Catalogo de Libros</title>
    </head>
    <body>
        <%
       ArrayList<Curso> cursos = (ArrayList<Curso>) request.getAttribute("listar-cursos-accion");
      //  ArrayList<Convocatoria> convocatorias = (ArrayList<Convocatoria>) request.getAttribute("listaConvocatorias");
        try {
            out.println("<html>");
            out.println("<head>");
            out.println("<title>LOGED IN</title>");
            out.println("</head>");
            out.println("<body>");
            out.println("<h1>CATALOGO DE LIBROS</h1>");
            out.println("<table border=1>");
            out.println("<thead>");
            out.println("<tr>");
            out.println("<th>NOMBRE</th>");
            out.println("<th>HORA INI</th>");
            out.println("<th>HORA FIN</th>");
            out.println("<th>OBSERVACION</th>");
            out.println("<th>LUGAR</th>");
            out.println("<th>DURACION</th>");
            out.println("<th>DURACION MIN</th>");
            out.println("<th>INI PREV</th>");
            out.println("<th>FIN PREV</th>");
          //  out.println("<th>ES ACTIVA</th>");
            out.println("<th>CURSO ID</th>");
            out.println("</tr>");
            out.println("</thead>");

            //<form name="formulario" action="./login.do" method="POST" ></form>
            for (Curso c : cursos) {
                out.println("<tr>");
                // <a href="destino.php?saludo=hola&texto=Esto es una variable texto">
                out.println("<td><a href=prueba?Curso=" + c.getCurId() + ">"+ c.getCurNom() +"</a></td>");
                out.println("<td>" + c.getCurHoraInicio() + "</td>");
                out.println("<td>" + c.getCurHoraFin() + "</td>");
               out.println("<td>" + c.getCurObservacion() + "</td>");
                out.println("<td>" + c.getCurLugarImpartido() + "</td>");
                out.println("<td>" + String.valueOf(c.getCurDuracion()) + "</td>");
                out.println("<td>" + String.valueOf(c.getCurDuracionMinutos()) + "</td>");
                out.println("<td>" + c.getCurFchaInPrev() + "</td>");
                out.println("<td>" + c.getCurFchaFinPrev() + "</td>");
              //  out.println("<td>" + c.isConActiva() + "</td>");
                out.println("<td>" + String.valueOf(c.getTipCurId()) + "</td>");
                out.println("</tr>");
            }
            out.println("</tbody>");
            out.println("</table>");
            out.println("</body>");
            out.println("</html>");

        } finally {

            out.close();
        }%>
    </body>
</html>
